<?php
namespace Common\Models;
use Common\BaseModel;
class FWalletsShopFreezeAmountLog extends BaseModel
{
    public $res;
    public $expire;

    public function initialize()
    {
        parent::initialize();
        $this->setSource('f_wallets_shop_freeze_amount_log');
    }


    public function admin_get_list($params=[]){
        $page = intval($params['page']);
        $size = intval($params['limit']);
        if ($page > 0) {
            $page = ($page - 1) * $size;
        }
        $conditions="shop_id={$params['shop_id']}";
        $get_list['items'] = $this->find(array(
            'conditions'=>$conditions,
            'order'=>'created_at desc',
            'limit'=>$size,
            'offset'=>$page,
        ))->toarray();
        $get_list['total'] = $this->count(array(
            'conditions'=>$conditions
        ));
        return $get_list;
    }
}
